﻿using Social;

namespace Logic.BusinessLogic.SocialNetworks
{
    public class Posting
    {
        internal static ContentServiceResponse<string> PostTextToFacebook(string token, string text)
        {
            return Social.Facebook.GraphApi.PostToFeed(token, "", text);
        }

        internal static ContentServiceResponse<string> PostLinkToFacebook(string token, string text)
        {
            return Social.Facebook.GraphApi.PostLinkToFeed(token, "", text, "", "", "", "");
        }

        internal static ContentServiceResponse<string> PostTextToTwitter(string token, string secret, string text)
        {
            var tw = new Social.Twitter.TwitterWrapper(token, secret);
            return tw.Post(text);
        }

        //internal static ContentServiceResponse<string> PostTextToWordPress(BO.Account account, string title, string text)
        //{
        //    var wp = new Social.Wordpress.Wordpress();
        //    var postid = wp.NewPost(new JoeBlogs.Structs.Post { title = "Test posting 0001", description = "This is my test first posting", categories = new string[] { "Test", "My application" }, dateCreated = DateTime.UtcNow }, true);
        //}
    }
}